from system.action import Action

class Player(Action):
    def receive_playerForward(self, args):
        self.object.setVar("alignedForce",(self.object.getVar("moveForce",50) * args.get('value',0),0))
        
    def receive_playerBack(self, args):
        self.object.setVar("alignedForce",(-self.object.getVar("moveForce",50) * args.get('value',0),0))
        
    def receive_playerLeft(self, args):
        self.object.setVar("torque",-self.object.getVar("turnTorque",2) * args.get('value',0))

    def receive_playerRight(self, args):
        self.object.setVar("torque",self.object.getVar("turnTorque",2) * args.get('value',0))
